package com.example.cloud.model.inventory;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Created by wangtao on 2018/8/18.
 * 入库记录
 */
@Entity(name = "inbound_record")
@Data
@EqualsAndHashCode(callSuper = false)
public class InboundRecord extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 商品名称
    @Column(name = "item_id")
    private Long itemId;
    // 商品名称
    @Column(name = "item_name")
    private String itemName;
    // 入库类型主键
    @Column(name = "type_id")
    private Long typeId;
    // 入库类型名称
    @Column(name = "type_name")
    private String typeName;
    // 入库数量
    @Column(name = "quantity")
    private int quantity;
    // 商品形态{0：正常品 1：异常品}
    @Column(name = "normal_flag", columnDefinition = "INT DEFAULT 0")
    private int normalFlag;
    // 入库备注
    @Column(name = "remark")
    private String remark;
    // 账户编号
    @Column(name = "account_id")
    private Long accountId;
    @Column(name = "user_id")
    private Long userId;
    @Column(name = "organ_id")
    private Long organId;
    @Column(name = "organ_name")
    private String organName;
}
